# -*- coding: utf-8 -*-
"""
-----------------------------------------------------------------
    File Name   : action.py
    Description : 操作码
    Author      : DuanGe
    Created On  : 2024/11/19
    Email       : duangeali@aliyun.com
    Version     : 1.0.0
    Copyright   : Copyright (c) 2024 DuanGe
    License     : Apache License 2.0
-----------------------------------------------------------------
"""
import os

from . import constant

# 创建data文件夹
if not os.path.exists(constant.DATA_FILE_PATH):
    os.makedirs(constant.DATA_FILE_PATH)

# 操作配置字典
action_config = [
    {
        "code": "1",
        "name": "配置用户信息",
        "handler": "set_user"
    },
    {
        "code": "2",
        "name": "配置上午抢座",
        "handler": "set_forenoon_grab_seat"
    },
    {
        "code": "3",
        "name": "配置下午抢座",
        "handler": "set_afternoon_grab_seat"
    },
    {
        "code": "4",
        "name": "查看用户信息",
        "handler": "show_user"
    },
    {
        "code": "5",
        "name": "查看上午抢座",
        "handler": "show_forenoon_grab_seat"
    },
    {
        "code": "6",
        "name": "查看下午抢座",
        "handler": "show_afternoon_grab_seat"
    },
    {
        "code": "7",
        "name": "开始进行抢座",
        "handler": "start_grab_seat"
    },
    {
        "code": "8",
        "name": "预约历史记录",
        "handler": "show_reserve_history"
    },
    {
        "code": "0",
        "name": "退出抢座系统",
        "handler": "quit"
    }
]
